var acco = $('.po')
var pass = $('.ps')
var btn = $('.deng')

btn.click(function () {
    var username = acco.val()
    var password = pass.val()
    console.log(username);
    if (username == "" || password == "") {
        alert('账号密码不能为空！')
        return false
    } else {
            //var user = localStorage.getItem("register")
            user = JSON.parse(user)
            $.each(user, function (index, value) {
                // console.log(value.password);
                if(username != value.username && password != value.password){
                    alert("账户不存在")
                    return false
                }
                else{
                    location.href = "./page1.html"
                    return false
                }
            })  
    }
})
